// http://api.douban.com/v2/movie/subject/1764796
const rp = require('request-promise-native')

async function fetchMovie (item) {
  const url = `https://douban.uieee.com/v2/movie/${item.doubanId}`
  let res = await rp(url)

  try {
    res = JSON.parse(res)
  } catch (err) {
    console.log(err)
    res = null
  }

  return res
}
;(async () =>{
    let movies = [
        {
            doubanId: '3914513'
        }
    ]
    movies.map(async movie => {
        let movieData = await fetchMovie(movie)
        console.log(movieData)
    })
    
})()